/*

Author   : chaos

FileName : str_ptr.cpp

Date     : 08/08/17 15:48:34

*/
#include <iostream>
using namespace std;

int main(void)
{
    char str_array[7][5] ={ "Mon","Tue","Wed","Thu","Frid","Sat","Sun"};

    char *str_ptr_array[7] = {"Mon","Tuesday","Wed","Thursday","Friday","Sat","Sun"};

    cout << "2d char array:" << endl;
    cout << "-------------------------" << endl;

    for (int i = 0; i < 7; i++) {
        cout << "{";
        for (int j = 0; j < 5; j++) {
            cout << str_array[i][j] << ".";

        }
        cout << "}" << endl;
    }

    cout << endl << "char pointer array : " << endl;
    cout << "---------------------------" << endl;

    for (int i = 0; i < 7; i++) {
        cout << " {";
        int j = 0;
        while(str_ptr_array[i][j] != '\0')
            cout << str_ptr_array[i][j++] << ".";

        cout <<"}" << endl;
    }
    return 0;
}
